package com.do1.entity;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Id;

import org.apache.commons.lang3.builder.ReflectionToStringBuilder;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 订单
 * @author MrChen
 *
 */
@Entity(name="order_t")
public class Order {
	    @Id
	    private String orderId;

	    //渠道id
	    private String chanId;

	    private String chanUserId;

	    /**
	     * @see com.imooc.entity.enums.OrderType
	     */
	    private String orderType;

	    private String productId;

	    private BigDecimal amount;

	    private String outerOrderId;

	    /**
	     * @see com.imooc.entity.enums.OrderStatus
	     */
	    private String orderStatus;

	    private String memo;

	    @JsonFormat(pattern = "YYYY-MM-DD HH:mm:ss")
	    private Date createAt;

	    @JsonFormat(pattern = "YYYY-MM-DD HH:mm:ss")
	    private Date updateAt;  
		@Override
		public String toString() {
			 return ReflectionToStringBuilder.toString(this);
		}
		public String getOrderId() {
			return orderId;
		}
		public void setOrderId(String orderId) {
			this.orderId = orderId;
		}
		public String getChanId() {
			return chanId;
		}
		public void setChanId(String chanId) {
			this.chanId = chanId;
		}
		public String getChanUserId() {
			return chanUserId;
		}
		public void setChanUserId(String chanUserId) {
			this.chanUserId = chanUserId;
		}
		public String getOrderType() {
			return orderType;
		}
		public void setOrderType(String orderType) {
			this.orderType = orderType;
		}
		public String getProductId() {
			return productId;
		}
		public void setProductId(String productId) {
			this.productId = productId;
		}
		public BigDecimal getAmount() {
			return amount;
		}
		public void setAmount(BigDecimal amount) {
			this.amount = amount;
		}
		public String getOuterOrderId() {
			return outerOrderId;
		}
		public void setOuterOrderId(String outerOrderId) {
			this.outerOrderId = outerOrderId;
		}
		public String getOrderStatus() {
			return orderStatus;
		}
		public void setOrderStatus(String orderStatus) {
			this.orderStatus = orderStatus;
		}
		public String getMemo() {
			return memo;
		}
		public void setMemo(String memo) {
			this.memo = memo;
		}
		public Date getCreateAt() {
			return createAt;
		}
		public void setCreateAt(Date createAt) {
			this.createAt = createAt;
		}
		public Date getUpdateAt() {
			return updateAt;
		}
		public void setUpdateAt(Date updateAt) {
			this.updateAt = updateAt;
		}
		

}
